<#import "/spring.ftl" as spring/>
<#import "/common/base.ftl" as base/>
<@base.page  "调拨单">
<style>
.btnn{font-size: 14px; font-weight: 400; line-height: 1.42857143; text-align: center; white-space: nowrap; vertical-align: middle; -ms-touch-action: manipulation; touch-action: manipulation; cursor: pointer; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; background-image: none; border: 1px solid transparent; border-radius: 4px;}
.btnn-default {color: #333;/* background-color: #ccc; */border-color: #ccc;}
.listinfo{width: 100%;height: 28px;padding: 6px 12px;font-size: 14px;line-height: 1.42857143;color: #555;background-color: #fff;background-image: none;border: 1px solid #ccc;border-radius: 4px;}
</style>
<div ng-controller="allocationEditController" style="width:90%;margin:0 auto;">
	<div class="row">
		<strong><p style="font-size:20px">调拨指示-<font style="color:red"><span style="color:red">${curAction}</span></font></p>
		</strong>
	</div>
	
	<div class="row">
		<div class="panel panel-default"  class="text-center">
			<div class="panel-heading">基本信息</div>
			  <div class="panel-body">
			  	 <table style="width:900px;" align="left">
			  			  <tbody>
							<tr>
							  <td class="text-left" style="height:50px;width:80px">&nbsp;&nbsp;<strong>调出仓库</strong></td>
							  <td class="text-left" style="height:50px;width:100px">
							    <select class="form-control" style="width:200px" ng-model="outWarehouseId" ng-change="whSelectChange()">
								  <option value="" selected >-全部-</option>
								  <option value="1">仓库1</option>
								  <option value="2">仓库2</option>
								</select>
                              </td>
							  <td class="text-right" style="height:50px;width:200px"><strong>调入仓库</strong>&nbsp;&nbsp;&nbsp;&nbsp;</td>
							  <td class="text-left">
							  	<select class="form-control" style="width:200px" ng-model="inWarehouseId" ng-change="whSelectChange()">
								  <option value="" selected >-全部-</option>
								  <option value="1">仓库1</option>
								  <option value="2">仓库2</option>
								</select>
							  </td>
							  <td class="text-right" style="height:50px;width:100px"><strong>调拨费用</strong>&nbsp;&nbsp;&nbsp;&nbsp;</td>
							  <td class="text-left">
							  	<input type="text" class="form-control round-border" style="width:100px" ng-model="allocationCost" placeholder="">
							  </td>
							</tr>
							<tr>
							  <td class="text-left" style="height:50px;width:120px" >&nbsp;&nbsp;<strong>预计出仓日期</strong></td>
							  <td class="text-left">
				                <input type="text" class="form-control" placeholder="" ng-model="hopeOutTime" my97datepicker="{ dateFmt: 'yyyy-MM-dd', readOnly: true }" style="width:120px" readonly="readonly">
							  </td>
							  <td class="text-right" style="height:50px;width:100px"><strong>预计到仓日期</strong>&nbsp;&nbsp;&nbsp;&nbsp;</td>
							  <td class="text-left">
				                <input type="text" class="form-control" placeholder="" ng-model="hopeInTime" my97datepicker="{ dateFmt: 'yyyy-MM-dd', readOnly: true }" style="width:120px" readonly="readonly">
							  </td>
							  <td class="text-right" style="height:50px;width:200px">&nbsp;</td>
							  <td class="text-left">
							  	&nbsp;
							  </td>
							</tr>
							<tr>
							  <td class="text-left">&nbsp;&nbsp;<strong>调拨原因</strong></td>
							  <td class="text-left" colspan="5"><textarea id="remark" cols="45" rows="5" ng-model="remark" maxlength="200"></textarea></td>
							</tr>
						  </tbody>
				  </table>
			  </div>
		</div>
	</div>
	
	<div class="row">
		<div class="panel panel-default"  class="text-center">
			<div class="panel-heading">商品信息</div>
			  <div class="panel-body">
			  <table class="table table-hover" style="width:100%">
			  			  <thead>
			  				<tr>
			  					<th class="text-center">调出货号</th>
			  					<th class="text-center">条码</th>
			  					<th class="text-center" style="width:200px;">商品名称</th>
			  					<th class="text-center">库存量</th>
			  					<th class="text-center">可用量</th>
			  					<th class="text-center">箱规</th>	
			  					<th class="text-center">调入货号</th>
			  					<th class="text-center">调拨数量</th>	
			  					<th class="text-center">操作</th>						
			  				</tr>
			  			  </thead>
			  			  <tbody>
							<tr ng-repeat="allocationorder in allocationorderList track by $index">
							  <td class="text-center">
							  <input ng-model="allocationorder.outGoodsSku" class="listinfo" style="width:100px" ng-blur="changeOutGoods($index);">
							  <button type="button" class="btnn btnn-default" ng-click="selectoutgoods($index);">...</button>
							  </td>
							  <td class="text-center" style="vertical-align:middle">{{allocationorder.outGoodsBarcode}}</td>
							  <td class="text-center" style="vertical-align:middle">{{allocationorder.outGoodsName}}</td>
							  
							  <td class="text-center" style="vertical-align:middle">{{allocationorder.outGoodsStock}}</td>
							  <td class="text-center" style="vertical-align:middle">{{allocationorder.outGoodsUsestock}}</td>
							  <td class="text-center" style="vertical-align:middle">{{allocationorder.outGoodsPacking}}</td>
							  <td class="text-center">
							  <input ng-model="allocationorder.inGoodsSku" class="listinfo" style="width:100px" ng-blur="changeInGoods($index);">
							  <button type="button" class="btnn btnn-default" ng-click="selectingoods($index);">...</button>
							  </td>
							  <td class="text-center" style="vertical-align:middle"><input ng-model="allocationorder.planQuantity" style="width:50px;" ng-change="changeNum($index);"  onfocus="this.focused=true;this.select();" onmouseup="if(this.focused){this.focused=false;return false;}"></td>

							  <td class="text-center" style="vertical-align:middle">
							    <a href="javascript:void(0);" ng-click="dell($index)">删除</a>&nbsp;&nbsp;
							    <a href="javascript:void(0);" ng-click="addd();">添加</a>
							  </td>
							</tr>
						  </tbody>
					</table>
			  </div>
		</div>
	</div>
	
	<div class="row">
		<table style="width:100%;">
			<tr>
				<td align="center">
					<button type="button" class="btn btn-primary" id="saveOrder" ng-click="saveOrder();">保存</button>
					<button type="button" class="btn btn-primary" id="back" ng-click="back();">返回</button>
				</td>
			</tr>
		</table>
	</div>
</div>
<script src="<@spring.url '/assets/pagejs/allocation/allocation.js' />"></script>
<link href="<@spring.url '/assets/js/ColorBox/colorbox.css' />" rel='stylesheet'>
<script src="<@spring.url '/assets/js/ColorBox/jquery.colorbox-min.js' />"></script>
</@base.page>